package de.akabahn.ebd.anlage;

/**
 *
 * @author moschlar
 */
public abstract class AbstractAbschnitt {

    protected String name;

    public AbstractAbschnitt() {}

    protected AbstractAbschnitt(String name) {
        this.name = name;
    }

    // <editor-fold defaultstate="collapsed" desc="Getter/Setter">
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    // </editor-fold>

    @Override
    public String toString() {
        return String.format("<AbstractAbschnitt %s>", this.name);
    }

    private String getDBDVarPrefix() {
        return this.getName().toUpperCase();
    }

    public String getDBDVar(String suffix) {
        return this.getDBDVarPrefix() + suffix;
    }

    public String getDBDVar() {
        return this.getDBDVar("B");
    }

}
